home *** CD-ROM | disk | FTP | other *** search
/ CD Exchange / CD Exchange - Volume 1.iso / utils / misc / siod / scm / pila.scm < prev    next >
Encoding:
Text File  |  2000-01-01  |  281 b   |  17 lines

  1. (define make-pila '())
  2.  
  3. (define empty-pila? null?)
  4.  
  5. (define (push x pila)
  6.         (cons x pila))
  7.  
  8. (define (pop pila)
  9.         (if (empty-pila? pila)
  10.             '()
  11.             (cdr pila)))
  12.  
  13. (define (top pila)
  14.         (if (empty-pila? pila)
  15.             '()
  16.             (car pila)))
  17.